Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update queries with sql in materialized view #418

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

cdolfi
Copy link
Collaborator

@cdolfi cdolfi commented Aug 22, 2023

This adds the sql query for materialized view in comments

Copy link
Contributor

@JamesKunstle JamesKunstle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of writing the entire materialized view SQL query in the docstring of the functions, let's create a document elsewhere and point to it in the docstring. This'll clean up the docstrings (which are what is shown when you hover over a function in VSCode or whatever else) and means that we don't have to change the query documentation in two places if the materialized view code changes.

Ideally, we wouldn't write the materialized view code in here at all, and instead point to a place where it can be read that updates automatically if the SQL gets rewritten by Sean at some point (so we don't have to come back into our repo and manually update the text)

@cdolfi
Copy link
Collaborator Author

cdolfi commented Aug 23, 2023

@JamesKunstle Im not too familiar with how materialized views work on if there is a way to "read" a materialized view. Ill noodle on where we can put the current sql write out and talk to sean about the possibility of "reading" the materialized view once we get past this current set of augur fixes

@cdolfi
Copy link
Collaborator Author

cdolfi commented Aug 24, 2023

@JamesKunstle Maybe we can add a materialized view section on the read me? Im struggling to find a good place for this but def think its important bc if anyone is hosting their own instance they will need that info

@cdolfi
Copy link
Collaborator Author

cdolfi commented Aug 24, 2023

@sgoggins just to confirm, materialized views are unique to a single db?

@JamesKunstle
Copy link
Contributor

@cdolfi I'd write the query as a .sql document in the 8Knot/docs folder and put a reference to that file in the company and contributors function docstrings.

@cdolfi
Copy link
Collaborator Author

cdolfi commented Aug 25, 2023

@JamesKunstle great ideas, implemented it. This is ready for review again

Copy link
Contributor

@JamesKunstle JamesKunstle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideal, lgtm!

@JamesKunstle JamesKunstle merged commit 3af80b1 into oss-aspen:dev Aug 25, 2023
5 checks passed
@cdolfi cdolfi deleted the query_doc_update branch August 29, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Sprint 27
Development

Successfully merging this pull request may close these issues.

2 participants